/*
 * Copyright (c) Jiandong.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import { ReactShadowNode } from './ReactShadowNode';
import { View } from './View';
import { ViewManagerDelegate } from './ViewManagerDelegate';
import { ReactStylesDiffMap } from './ReactStylesDiffMap';
export class ViewManagerPropertyUpdater {
//  public interface Settable {
//  void getProperties(Map<String, String> props);
//}

//public interface ViewManagerSetter<T extends ViewManager, V extends View> extends Settable {
//  void setProperty(T manager, V view, String name, Object value);
//}
//
//public interface ShadowNodeSetter<T extends ReactShadowNode> extends Settable {
//  void setProperty(T node, String name, Object value);
//}
//
//private static final String TAG = "ViewManagerPropertyUpdater";
//
//private static final Map<Class<?>, ViewManagerSetter<?, ?>> VIEW_MANAGER_SETTER_MAP =
//new HashMap<>();
//private static final Map<Class<?>, ShadowNodeSetter<?>> SHADOW_NODE_SETTER_MAP = new HashMap<>();
//
//public static void clear() {
//  ViewManagersPropertyCache.clear();
//  VIEW_MANAGER_SETTER_MAP.clear();
//  SHADOW_NODE_SETTER_MAP.clear();
//}

  // public static updateProps<T extends ViewManagerDelegate<V>, V extends View>(
  //  delegate: T, v: V, props: ReactStylesDiffMap): void {
  //    Iterator<Map.Entry<String, Object>> iterator = props.mBackingMap.getEntryIterator();
  //    while (iterator.hasNext()) {
  //      Map.Entry<String, Object> entry = iterator.next();
  //      delegate.setProperty(v, entry.getKey(), entry.getValue());
  //    }
  //}

  public static updateProps<T extends ReactShadowNode>(node: T, props: ReactStylesDiffMap): void {
//    ShadowNodeSetter<T> setter = findNodeSetter(node.getClass());
//    Iterator<Map.Entry<String, Object>> iterator = props.mBackingMap.getEntryIterator();
//    while (iterator.hasNext()) {
//    Map.Entry<String, Object> entry = iterator.next();
//    setter.setProperty(node, entry.getKey(), entry.getValue());
  }
}
